package com.southwind.mapper;

import com.southwind.entity.Station;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2024-07-04
 */
public interface StationMapper extends BaseMapper<Station> {

    @Select({"select name from station where id = #{id} "})
    public String getNameById(Integer id);

    @Select({"select * from station where status = '空闲'"})
    public List<Station> show();

    @Update({"update station set status = #{status} where id = #{id}"})
    public Integer updateStatus(String status,Integer id);
}
